<?php

namespace App\Http\Controllers\Index;

use App\Models\Index\LiveAmuse;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class AmuseController extends Controller
{
    public function index(Request $request)
    {
        $page       = (int)$request->input('page');
        if (empty($page)) {
            return self::response(null,-1,'页码不能为空');
        }
        $data       = LiveAmuse::getAmuseList();
        return self::response($data,'200');
    }

    public function cate(Request $request)
    {
        $cate_id = (int)$request->input('cate_id');
        if (empty($cate_id)) {
            return self::response(null,-1,'请选择分类哦~');
        }
        $data = LiveAmuse::getAmuseListByCateId($cate_id);
        return self::response($data,'200');
    }
}
